/*************************************************************************
 *                                                                       *
 * This file is part of the DogosFrame distribution.  For full copyright *
 * information, see COPYRIGHT and COPYING.LESSER.                        *
 *                                                                       *
 * Author:           sqbang                                              *
 * Email:            sqbang@ustc.edu                                     *
 *                                                                       *
 *************************************************************************/

namespace FreeMAPs
{

inline void
InfoManager::remove_state_indicator(
    const StateIndicator* state_indicator) const
{
    if (d_all_state_indicators.has_key (state_indicator))
    {
        d_all_state_indicators.erase_by_key (state_indicator);
    }
}


inline const CommonInfo*
InfoManager::get_common_info() const
{
    FREEMAPS_ASSERT_VALID_POINTER (d_common_info);

    /*
     * note that CommonInfo does not require rebuild.
     */

    return d_common_info;
}


inline CommonInfo*
InfoManager::get_common_info()
{
    FREEMAPS_ASSERT_VALID_POINTER (d_common_info);

    /*
     * note that CommonInfo does not require rebuild.
     */

    return d_common_info;
}


inline const WriterInfo*
InfoManager::get_writer_info() const
{
    FREEMAPS_ASSERT_VALID_POINTER (d_writer_info);

    /*
     * note that WriterInfo does not require rebuild.
     */

    return d_writer_info;
}


inline WriterInfo*
InfoManager::get_writer_info()
{
    FREEMAPS_ASSERT_VALID_POINTER (d_writer_info);

    /*
     * note that WriterInfo does not require rebuild.
     */

    return d_writer_info;
}


inline const MeshInfo*
InfoManager::get_mesh_info() const
{
    FREEMAPS_ASSERT_VALID_POINTER (d_mesh_info);

    /*
     * note that MeshInfo does not require rebuild.
     */

    return d_mesh_info;
}


inline MeshInfo*
InfoManager::get_mesh_info()
{
    FREEMAPS_ASSERT_VALID_POINTER (d_mesh_info);

    /*
     * note that MeshInfo does not require rebuild.
     */

    return d_mesh_info;
}


inline const TimePatch*
InfoManager::get_time_patch() const
{
    FREEMAPS_ASSERT_VALID_POINTER (d_time_patch);

    /*
     * note that TimePatch does not require rebuild.
     */

    return d_time_patch;
}


inline TimePatch*
InfoManager::get_time_patch()
{
    FREEMAPS_ASSERT_VALID_POINTER (d_time_patch);

    /*
     * note that TimePatch does not require rebuild.
     */

    return d_time_patch;
}


inline const bool
InfoManager::is_un_steady() const
{
    return d_is_un_steady;
}


inline void
InfoManager::set_un_steady(const bool is_un_steady)
{
    d_is_un_steady = is_un_steady;
}


inline AttributeInfo*
InfoManager::get_attribute_info() const
{
    FREEMAPS_ASSERT_VALID_POINTER (d_attribute_info);

    /*
     * note that AttributeInfo does not require rebuild.
     */

    return d_attribute_info;
}


inline const RegionInfo*
InfoManager::get_region_info() const
{
    FREEMAPS_ASSERT_VALID_POINTER (d_region_info);

    /*
     * note that RegionInfo does not require rebuild.
     */

    return d_region_info;
}


inline RegionInfo*
InfoManager::get_region_info()
{
    FREEMAPS_ASSERT_VALID_POINTER (d_region_info);

    /*
     * note that RegionInfo does not require rebuild.
     */

    return d_region_info;
}


inline void
InfoManager::set_input_file_name (
    const std::string& file_name)
{
    d_input_file_name = file_name;
}


inline const void
InfoManager::set_mesh_file_name(
        const std::string mesh_file_name)
{
    d_mesh_file_name = mesh_file_name;
}


inline const bool
InfoManager::is_mesh_file_name_exist() const
{
    return !(d_mesh_file_name.empty());
}


inline bool
InfoManager::is_mesh_info_exist() const
{
    return d_is_mesh_info_exist;
}


inline bool
InfoManager::is_attribute_info_exist() const
{
    return d_is_attribute_info_exist;
}


inline bool
InfoManager::is_region_info_exist() const
{
    return d_is_region_info_exist;
}

} // namespace FreeMAPs
